// Main.java
import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) {
        // 2*8 + 3*13 = 16 + 39 = 55
        System.out.println(SupermarketSystem.calculateTotalForA(2, 3).setScale(2, BigDecimal.ROUND_HALF_UP));
        // 2*8 + 3*13 + 4*20 = 16 + 39 + 80 = 135
        System.out.println(SupermarketSystem.calculateTotalForB(2, 3, 4).setScale(2, BigDecimal.ROUND_HALF_UP));
        // 2*8 + 3*13*0.8 + 4*20 + 5*25 = 16 + 31.2 + 80 + 125 = 127.2
        System.out.println(SupermarketSystem.calculateTotalForC(2, 3, 4).setScale(2, BigDecimal.ROUND_HALF_UP));
        // 2*8 + 3*13*0.8 + 4*20 + 5*25 = 127.2 > 100?117.2:127.2
        System.out.println(SupermarketSystem.calculateTotalForD(2, 3, 4).setScale(2, BigDecimal.ROUND_HALF_UP));
    }
}